<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button onclick="getNews()">获取头条新闻</button>
    <script type="text/javascript">
        async function getNews() {
            const url = "https://www.toutiao.com/hot-event/hot-board/?origin=toutiao_pc";
            const response = await fetch(url);
            let data = await response.json()
            console.log(data);
        }
    </script>
</body>

</html>